package com.yfp.operation.mapper;

import com.yfp.operation.domain.UserWithdraw;
import com.yfp.operation.domain.dto.UserWithdrawRequestDTO;
import com.yfp.operation.domain.dto.UserWithdrawResponseDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 用户提现账单
 *
 * @CreateDate: 2024/5/28 14:18
 * @UpdateUser:
 * @UpdateDate: 2024/5/28 14:18
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
@Mapper
public interface UserWithdrawMapper {
    /**
     * 查询记录
     *
     * @param userId
     * @return
     */
    List<UserWithdraw> getByUserId(@Param("userId") Long userId);

    /**
     * 新增
     *
     * @param userWithdraw
     */
    void add(UserWithdraw userWithdraw);

    /**
     * 修改
     *
     * @param userWithdraw
     */
    void edit(UserWithdraw userWithdraw);

    /**
     * 获取最大提现编号
     *
     * @param userId
     * @return
     */
    String getMaxWithdrawSnByUserId(@Param("userId") Long userId);

    /**
     * 获取提现详情
     *
     * @param requestDTO
     * @return
     */
    List<UserWithdrawResponseDTO> getManagementWithdrawList(UserWithdrawRequestDTO requestDTO);

    UserWithdraw getById(@Param("id") Long id);
}
